﻿
using System.Text.RegularExpressions;

namespace Coldairarrow.Util
{
    /// <summary>
    /// 正则判断是否为数字帮助类
    /// </summary>
    public static class CheckNumberHelper
    {
        public static bool CheckNumber(string text)
        {
            bool IsNumber = false;
            Regex regex = new Regex(@"^[+-]?\d*(,\d{3})*(\.\d+)?$");
            if (regex.IsMatch(text))
            {
                IsNumber = true;
            }
            return IsNumber;
        }
    }
}